package Controller;

import Helper.*;
import Model.*;

public class AdminController {
    private static Admin a = null;

    public static boolean login(String username, String password){
        AdminM adminM = new AdminM();

        a = adminM.login(username, password);

        if( a != null ){
            Helper.setSession(0, a.name);
            Helper.setSession(1, String.valueOf(a.id));

            return true;
        }else{
            Helper.waitter();

            return false;
        }
    }
}
